﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Taoyl.CodeTraceDAL;
using xbd.DataConvertLib;

namespace Taoyl.CodeTraceBLL
{
    public class SqlSugarManger
    {
        private SqlSugarService sqlSugarService=new SqlSugarService();

        public void SetConnectionString(string connectionString)
        {
            sqlSugarService.SetConnectionString(connectionString);
        }

        public OperateResult CreateTable<T>(int strLength=100)
        {
            try
            {
                sqlSugarService.CreateTable<T>(strLength);
                return OperateResult.CreateSuccessResult();
            }
            catch (Exception ex)
            {
                return OperateResult.CreateFailResult(ex.Message);
            }

        }
    }
}
